package com.example.domain.usecase;

import com.example.domain.entity.Post;
import com.example.domain.repo.JsonPlaceHolderRepo;
import com.example.domain.result.Result;

import javax.inject.Inject;

public class GetUserByIdUseCase extends UseCase<Integer, Result<Post>>{


    private JsonPlaceHolderRepo jsonPlaceHolderRepo;

    @Inject
    public GetUserByIdUseCase(JsonPlaceHolderRepo jsonPlaceHolderRepo){
        this.jsonPlaceHolderRepo = jsonPlaceHolderRepo;
    }

    @Override
    public Result<Post> execute(Integer params) {
        return jsonPlaceHolderRepo.getPostById(params);
    }
}
